﻿package model.message;

import java.util.HashMap;

import org.jboss.netty.channel.Channel;

public class MessageVo {
	
	// /socket ArrayList position
	// socket 队列中心的id
	private int		id;
	
	private  Channel channel;
	
	private int		Type;
	
	private HashMap	AllDataMap;
	
	private Object	content;
	
	/**
	 * socket 队列中心的id
	 * @return int
	 */
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
//	public Object getMsg() {
//		return msg;
//	}
//	
//	public void setMsg(Object msg) {
//		this.msg = msg;
//	}
	
	public void setType(int type) {
		Type = type;
	}
	
	public int getType() {
		return Type;
	}
	
//	public void setMap(HashMap map) {
//		this.map = map;
//	}
//	
	/**
	 * 
	 * 获取所有数据
	 * @return
	 */
	public HashMap getAllData() {
		if (AllDataMap == null) {
			AllDataMap = new HashMap();
		}
		if (id != 0) {
			AllDataMap.put("id", id);
		}
		if (Type != 0) {
			AllDataMap.put("Type", Type);
			AllDataMap.put("content", getContent());
			return AllDataMap;
		}
		return null;
	}

	public Object getContent() {
		return content;
	}

	public void setContent(Object content) {
		this.content = content;
	}

	public Channel getChannel() {
		return channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

}
